package com.ruoyi.saleReturn.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.product.domain.Product;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 采购退货主表
 *
 * @author WangChangShuo
 * @date 2022年06月17日 14:12
 */
public class SaleReturnOrder extends BaseEntity {

    private String beginTime;
    private String endTime;
    /**
     * 销售退货自增主键id
     */
    private Long saleReturnId;
    /**
     * 选择的销货单主键
     */
    private Long saleGoodsId;
    /**
     * 销货单订单编号
     */
    private String saleGoodsNum;
    /**
     * 选择的对方做的采购退货单主键
     */
    private Long purchaseReturnId;
    /**
     * 采购入库订单编号
     */
    private String procurementWarehousingName;
    /**
     * 部门id（该单子属于哪个部门）
     */
    private Long deptId;
    /**
     * 业务员id
     */
    private Long userId;
    /**
     * 业务员名称
     */
    private String userName;
    /**
     * 客户id
     */
    private Long companyId;
    private Long customerId;
    /**
     * 客户名称
     */
    private String companyName;
    /**
     * 订单日期
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    private Date saleReturnDate;
    /**
     * 订单审核时间
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    private Date auditTime;
    /**
     * 订单金额
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private BigDecimal amount;
    /**
     * 订单金额(含税)
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private BigDecimal taxAmount;
    /**
     * 订单状态
     */
    private String saleReturnStatus;
    private List<SaleReturnModel> saleReturnModels;
    /**
     * 产品表
     */
    private List<Product> products;
    private Long saleGoodsModelId;

    public String getEndTime() {
        return endTime;
    }

    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }

    public String getBeginTime() {
        return beginTime;
    }

    public void setBeginTime(String beginTime) {
        this.beginTime = beginTime;
    }

    public Long getCustomerId() {
        return customerId;
    }

    public void setCustomerId(Long customerId) {
        this.customerId = customerId;
    }

    public Long getSaleGoodsModelId() {
        return saleGoodsModelId;
    }

    public void setSaleGoodsModelId(Long saleGoodsModelId) {
        this.saleGoodsModelId = saleGoodsModelId;
    }

    public List<Product> getProducts() {
        return products;
    }

    public void setProducts(List<Product> products) {
        this.products = products;
    }

    public List<SaleReturnModel> getSaleReturnModels() {
        return saleReturnModels;
    }

    public void setSaleReturnModels(List<SaleReturnModel> saleReturnModels) {
        this.saleReturnModels = saleReturnModels;
    }

    public String getProcurementWarehousingName() {
        return procurementWarehousingName;
    }

    public void setProcurementWarehousingName(String procurementWarehousingName) {
        this.procurementWarehousingName = procurementWarehousingName;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getCompanyName() {
        return companyName;
    }

    public void setCompanyName(String companyName) {
        this.companyName = companyName;
    }

    public Long getCompanyId() {
        return companyId;
    }

    public void setCompanyId(Long companyId) {
        this.companyId = companyId;
    }

    public Long getSaleReturnId() {
        return saleReturnId;
    }

    public void setSaleReturnId(Long saleReturnId) {
        this.saleReturnId = saleReturnId;
    }

    public Long getSaleGoodsId() {
        return saleGoodsId;
    }

    public void setSaleGoodsId(Long saleGoodsId) {
        this.saleGoodsId = saleGoodsId;
    }

    public String getSaleGoodsNum() {
        return saleGoodsNum;
    }

    public void setSaleGoodsNum(String saleGoodsNum) {
        this.saleGoodsNum = saleGoodsNum;
    }

    public Long getPurchaseReturnId() {
        return purchaseReturnId;
    }

    public void setPurchaseReturnId(Long purchaseReturnId) {
        this.purchaseReturnId = purchaseReturnId;
    }

    public Long getDeptId() {
        return deptId;
    }

    public void setDeptId(Long deptId) {
        this.deptId = deptId;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Date getSaleReturnDate() {
        return saleReturnDate;
    }

    public void setSaleReturnDate(Date saleReturnDate) {
        this.saleReturnDate = saleReturnDate;
    }

    public Date getAuditTime() {
        return auditTime;
    }

    public void setAuditTime(Date auditTime) {
        this.auditTime = auditTime;
    }

    public BigDecimal getAmount() {
        return amount;
    }

    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }

    public BigDecimal getTaxAmount() {
        return taxAmount;
    }

    public void setTaxAmount(BigDecimal taxAmount) {
        this.taxAmount = taxAmount;
    }

    public String getSaleReturnStatus() {
        return saleReturnStatus;
    }

    public void setSaleReturnStatus(String saleReturnStatus) {
        this.saleReturnStatus = saleReturnStatus;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("saleReturnId", getSaleReturnId())
                .append("saleGoodsId", getSaleGoodsId())
                .append("saleGoodsNum", getSaleGoodsNum())
                .append("purchaseReturnId", getPurchaseReturnId())
                .append("deptId", getDeptId())
                .append("userId", getUserId())
                .append("saleReturnDate", getSaleReturnDate())
                .append("auditTime", getAuditTime())
                .append("amount", getAmount())
                .append("taxAmount", getTaxAmount())
                .append("remark", getRemark())
                .append("saleReturnStatus", getSaleReturnStatus())
                .append("createTime", getCreateTime())
                .append("createBy", getCreateBy())
                .append("updateTime", getUpdateTime())
                .append("updateBy", getUpdateBy())
                .toString();
    }
}
